package cn.whdream.mapper.sqlsqerver.ehaipost.dbo;

import static cn.whdream.mapper.sqlsqerver.ehaipost.dbo.BlockOrderDetailFeeSummaryDynamicSqlSupport.*;

import cn.whdream.test.entity.ehaipost.dbo.BlockOrderDetailFeeSummary;
import java.util.List;
import javax.annotation.Generated;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.dynamic.sql.SqlBuilder;
import org.mybatis.dynamic.sql.delete.DeleteDSL;
import org.mybatis.dynamic.sql.delete.MyBatis3DeleteModelAdapter;
import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider;
import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider;
import org.mybatis.dynamic.sql.render.RenderingStrategy;
import org.mybatis.dynamic.sql.select.MyBatis3SelectModelAdapter;
import org.mybatis.dynamic.sql.select.QueryExpressionDSL;
import org.mybatis.dynamic.sql.select.SelectDSL;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.mybatis.dynamic.sql.update.MyBatis3UpdateModelAdapter;
import org.mybatis.dynamic.sql.update.UpdateDSL;
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;

@Mapper
public interface BlockOrderDetailFeeSummaryMapper {
    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    @SelectProvider(type=SqlProviderAdapter.class, method="select")
    long count(SelectStatementProvider selectStatement);

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    @DeleteProvider(type=SqlProviderAdapter.class, method="delete")
    int delete(DeleteStatementProvider deleteStatement);

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    @InsertProvider(type=SqlProviderAdapter.class, method="insert")
    int insert(InsertStatementProvider<BlockOrderDetailFeeSummary> insertStatement);

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    @SelectProvider(type=SqlProviderAdapter.class, method="select")
    @Results(id="BlockOrderDetailFeeSummaryResult", value = {
        @Result(column="SummaryID", property="summaryid", jdbcType=JdbcType.INTEGER),
        @Result(column="ContractId", property="contractid", jdbcType=JdbcType.INTEGER),
        @Result(column="PostYear", property="postyear", jdbcType=JdbcType.SMALLINT),
        @Result(column="PostMonth", property="postmonth", jdbcType=JdbcType.SMALLINT),
        @Result(column="StatementNo", property="statementno", jdbcType=JdbcType.VARCHAR),
        @Result(column="IsStatement", property="isstatement", jdbcType=JdbcType.BIT),
        @Result(column="FromDate", property="fromdate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ToDate", property="todate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="TotalAmount", property="totalamount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ActiveFlag", property="activeflag", jdbcType=JdbcType.CHAR),
        @Result(column="FeeType", property="feetype", jdbcType=JdbcType.CHAR),
        @Result(column="OrderNo", property="orderno", jdbcType=JdbcType.VARCHAR),
        @Result(column="DriverBonusRemark", property="driverbonusremark", jdbcType=JdbcType.VARCHAR),
        @Result(column="UltraKmStart", property="ultrakmstart", jdbcType=JdbcType.DECIMAL),
        @Result(column="UltraKmEnd", property="ultrakmend", jdbcType=JdbcType.DECIMAL),
        @Result(column="UltraKmActual", property="ultrakmactual", jdbcType=JdbcType.DECIMAL),
        @Result(column="UltraKm", property="ultrakm", jdbcType=JdbcType.DECIMAL),
        @Result(column="DriverNo", property="driverno", jdbcType=JdbcType.VARCHAR),
        @Result(column="OtherMoneyRemark", property="othermoneyremark", jdbcType=JdbcType.VARCHAR),
        @Result(column="LocalMoneyRemark", property="localmoneyremark", jdbcType=JdbcType.VARCHAR),
        @Result(column="Net", property="net", jdbcType=JdbcType.DECIMAL),
        @Result(column="ZhimingNet", property="zhimingnet", jdbcType=JdbcType.DECIMAL),
        @Result(column="EhaiNet", property="ehainet", jdbcType=JdbcType.DECIMAL),
        @Result(column="PostDate", property="postdate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="FlowNo", property="flowno", jdbcType=JdbcType.VARCHAR),
        @Result(column="AddOperNo", property="addoperno", jdbcType=JdbcType.VARCHAR),
        @Result(column="CheckStatus", property="checkstatus", jdbcType=JdbcType.TINYINT),
        @Result(column="InvoiceTitleId", property="invoicetitleid", jdbcType=JdbcType.INTEGER),
        @Result(column="OldOrderNo", property="oldorderno", jdbcType=JdbcType.VARCHAR),
        @Result(column="OldDate", property="olddate", jdbcType=JdbcType.DATE),
        @Result(column="PaymentType", property="paymenttype", jdbcType=JdbcType.TINYINT),
        @Result(column="VerifyOprNo", property="verifyoprno", jdbcType=JdbcType.VARCHAR),
        @Result(column="VerifyDate", property="verifydate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="VerifyRemark", property="verifyremark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateDate", property="createdate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="FeeIndex", property="feeindex", jdbcType=JdbcType.INTEGER),
        @Result(column="BeforeNet", property="beforenet", jdbcType=JdbcType.DECIMAL),
        @Result(column="IsDeleted", property="isdeleted", jdbcType=JdbcType.BIT),
        @Result(column="DeleterUserId", property="deleteruserid", jdbcType=JdbcType.NVARCHAR),
        @Result(column="DeletionTime", property="deletiontime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="LastModificationTime", property="lastmodificationtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="LastModifierUserId", property="lastmodifieruserid", jdbcType=JdbcType.NVARCHAR),
        @Result(column="CreationTime", property="creationtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreatorUserId", property="creatoruserid", jdbcType=JdbcType.NVARCHAR),
        @Result(column="ReviseType", property="revisetype", jdbcType=JdbcType.INTEGER)
    })
    List<BlockOrderDetailFeeSummary> selectMany(SelectStatementProvider selectStatement);

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    @UpdateProvider(type=SqlProviderAdapter.class, method="update")
    int update(UpdateStatementProvider updateStatement);

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
        return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
                .from(blockOrderDetailFeeSummary);
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
        return DeleteDSL.deleteFromWithMapper(this::delete, blockOrderDetailFeeSummary);
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default int insert(BlockOrderDetailFeeSummary record) {
        return insert(SqlBuilder.insert(record)
                .into(blockOrderDetailFeeSummary)
                .map(summaryid).toProperty("summaryid")
                .map(contractid).toProperty("contractid")
                .map(postyear).toProperty("postyear")
                .map(postmonth).toProperty("postmonth")
                .map(statementno).toProperty("statementno")
                .map(isstatement).toProperty("isstatement")
                .map(fromdate).toProperty("fromdate")
                .map(todate).toProperty("todate")
                .map(totalamount).toProperty("totalamount")
                .map(activeflag).toProperty("activeflag")
                .map(feetype).toProperty("feetype")
                .map(orderno).toProperty("orderno")
                .map(driverbonusremark).toProperty("driverbonusremark")
                .map(ultrakmstart).toProperty("ultrakmstart")
                .map(ultrakmend).toProperty("ultrakmend")
                .map(ultrakmactual).toProperty("ultrakmactual")
                .map(ultrakm).toProperty("ultrakm")
                .map(driverno).toProperty("driverno")
                .map(othermoneyremark).toProperty("othermoneyremark")
                .map(localmoneyremark).toProperty("localmoneyremark")
                .map(net).toProperty("net")
                .map(zhimingnet).toProperty("zhimingnet")
                .map(ehainet).toProperty("ehainet")
                .map(postdate).toProperty("postdate")
                .map(flowno).toProperty("flowno")
                .map(addoperno).toProperty("addoperno")
                .map(checkstatus).toProperty("checkstatus")
                .map(invoicetitleid).toProperty("invoicetitleid")
                .map(oldorderno).toProperty("oldorderno")
                .map(olddate).toProperty("olddate")
                .map(paymenttype).toProperty("paymenttype")
                .map(verifyoprno).toProperty("verifyoprno")
                .map(verifydate).toProperty("verifydate")
                .map(verifyremark).toProperty("verifyremark")
                .map(createdate).toProperty("createdate")
                .map(feeindex).toProperty("feeindex")
                .map(beforenet).toProperty("beforenet")
                .map(isdeleted).toProperty("isdeleted")
                .map(deleteruserid).toProperty("deleteruserid")
                .map(deletiontime).toProperty("deletiontime")
                .map(lastmodificationtime).toProperty("lastmodificationtime")
                .map(lastmodifieruserid).toProperty("lastmodifieruserid")
                .map(creationtime).toProperty("creationtime")
                .map(creatoruserid).toProperty("creatoruserid")
                .map(revisetype).toProperty("revisetype")
                .build()
                .render(RenderingStrategy.MYBATIS3));
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default int insertSelective(BlockOrderDetailFeeSummary record) {
        return insert(SqlBuilder.insert(record)
                .into(blockOrderDetailFeeSummary)
                .map(summaryid).toPropertyWhenPresent("summaryid", record::getSummaryid)
                .map(contractid).toPropertyWhenPresent("contractid", record::getContractid)
                .map(postyear).toPropertyWhenPresent("postyear", record::getPostyear)
                .map(postmonth).toPropertyWhenPresent("postmonth", record::getPostmonth)
                .map(statementno).toPropertyWhenPresent("statementno", record::getStatementno)
                .map(isstatement).toPropertyWhenPresent("isstatement", record::getIsstatement)
                .map(fromdate).toPropertyWhenPresent("fromdate", record::getFromdate)
                .map(todate).toPropertyWhenPresent("todate", record::getTodate)
                .map(totalamount).toPropertyWhenPresent("totalamount", record::getTotalamount)
                .map(activeflag).toPropertyWhenPresent("activeflag", record::getActiveflag)
                .map(feetype).toPropertyWhenPresent("feetype", record::getFeetype)
                .map(orderno).toPropertyWhenPresent("orderno", record::getOrderno)
                .map(driverbonusremark).toPropertyWhenPresent("driverbonusremark", record::getDriverbonusremark)
                .map(ultrakmstart).toPropertyWhenPresent("ultrakmstart", record::getUltrakmstart)
                .map(ultrakmend).toPropertyWhenPresent("ultrakmend", record::getUltrakmend)
                .map(ultrakmactual).toPropertyWhenPresent("ultrakmactual", record::getUltrakmactual)
                .map(ultrakm).toPropertyWhenPresent("ultrakm", record::getUltrakm)
                .map(driverno).toPropertyWhenPresent("driverno", record::getDriverno)
                .map(othermoneyremark).toPropertyWhenPresent("othermoneyremark", record::getOthermoneyremark)
                .map(localmoneyremark).toPropertyWhenPresent("localmoneyremark", record::getLocalmoneyremark)
                .map(net).toPropertyWhenPresent("net", record::getNet)
                .map(zhimingnet).toPropertyWhenPresent("zhimingnet", record::getZhimingnet)
                .map(ehainet).toPropertyWhenPresent("ehainet", record::getEhainet)
                .map(postdate).toPropertyWhenPresent("postdate", record::getPostdate)
                .map(flowno).toPropertyWhenPresent("flowno", record::getFlowno)
                .map(addoperno).toPropertyWhenPresent("addoperno", record::getAddoperno)
                .map(checkstatus).toPropertyWhenPresent("checkstatus", record::getCheckstatus)
                .map(invoicetitleid).toPropertyWhenPresent("invoicetitleid", record::getInvoicetitleid)
                .map(oldorderno).toPropertyWhenPresent("oldorderno", record::getOldorderno)
                .map(olddate).toPropertyWhenPresent("olddate", record::getOlddate)
                .map(paymenttype).toPropertyWhenPresent("paymenttype", record::getPaymenttype)
                .map(verifyoprno).toPropertyWhenPresent("verifyoprno", record::getVerifyoprno)
                .map(verifydate).toPropertyWhenPresent("verifydate", record::getVerifydate)
                .map(verifyremark).toPropertyWhenPresent("verifyremark", record::getVerifyremark)
                .map(createdate).toPropertyWhenPresent("createdate", record::getCreatedate)
                .map(feeindex).toPropertyWhenPresent("feeindex", record::getFeeindex)
                .map(beforenet).toPropertyWhenPresent("beforenet", record::getBeforenet)
                .map(isdeleted).toPropertyWhenPresent("isdeleted", record::getIsdeleted)
                .map(deleteruserid).toPropertyWhenPresent("deleteruserid", record::getDeleteruserid)
                .map(deletiontime).toPropertyWhenPresent("deletiontime", record::getDeletiontime)
                .map(lastmodificationtime).toPropertyWhenPresent("lastmodificationtime", record::getLastmodificationtime)
                .map(lastmodifieruserid).toPropertyWhenPresent("lastmodifieruserid", record::getLastmodifieruserid)
                .map(creationtime).toPropertyWhenPresent("creationtime", record::getCreationtime)
                .map(creatoruserid).toPropertyWhenPresent("creatoruserid", record::getCreatoruserid)
                .map(revisetype).toPropertyWhenPresent("revisetype", record::getRevisetype)
                .build()
                .render(RenderingStrategy.MYBATIS3));
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<BlockOrderDetailFeeSummary>>> selectByExample() {
        return SelectDSL.selectWithMapper(this::selectMany, summaryid, contractid, postyear, postmonth, statementno, isstatement, fromdate, todate, totalamount, activeflag, feetype, orderno, driverbonusremark, ultrakmstart, ultrakmend, ultrakmactual, ultrakm, driverno, othermoneyremark, localmoneyremark, net, zhimingnet, ehainet, postdate, flowno, addoperno, checkstatus, invoicetitleid, oldorderno, olddate, paymenttype, verifyoprno, verifydate, verifyremark, createdate, feeindex, beforenet, isdeleted, deleteruserid, deletiontime, lastmodificationtime, lastmodifieruserid, creationtime, creatoruserid, revisetype)
                .from(blockOrderDetailFeeSummary);
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<BlockOrderDetailFeeSummary>>> selectDistinctByExample() {
        return SelectDSL.selectDistinctWithMapper(this::selectMany, summaryid, contractid, postyear, postmonth, statementno, isstatement, fromdate, todate, totalamount, activeflag, feetype, orderno, driverbonusremark, ultrakmstart, ultrakmend, ultrakmactual, ultrakm, driverno, othermoneyremark, localmoneyremark, net, zhimingnet, ehainet, postdate, flowno, addoperno, checkstatus, invoicetitleid, oldorderno, olddate, paymenttype, verifyoprno, verifydate, verifyremark, createdate, feeindex, beforenet, isdeleted, deleteruserid, deletiontime, lastmodificationtime, lastmodifieruserid, creationtime, creatoruserid, revisetype)
                .from(blockOrderDetailFeeSummary);
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(BlockOrderDetailFeeSummary record) {
        return UpdateDSL.updateWithMapper(this::update, blockOrderDetailFeeSummary)
                .set(summaryid).equalTo(record::getSummaryid)
                .set(contractid).equalTo(record::getContractid)
                .set(postyear).equalTo(record::getPostyear)
                .set(postmonth).equalTo(record::getPostmonth)
                .set(statementno).equalTo(record::getStatementno)
                .set(isstatement).equalTo(record::getIsstatement)
                .set(fromdate).equalTo(record::getFromdate)
                .set(todate).equalTo(record::getTodate)
                .set(totalamount).equalTo(record::getTotalamount)
                .set(activeflag).equalTo(record::getActiveflag)
                .set(feetype).equalTo(record::getFeetype)
                .set(orderno).equalTo(record::getOrderno)
                .set(driverbonusremark).equalTo(record::getDriverbonusremark)
                .set(ultrakmstart).equalTo(record::getUltrakmstart)
                .set(ultrakmend).equalTo(record::getUltrakmend)
                .set(ultrakmactual).equalTo(record::getUltrakmactual)
                .set(ultrakm).equalTo(record::getUltrakm)
                .set(driverno).equalTo(record::getDriverno)
                .set(othermoneyremark).equalTo(record::getOthermoneyremark)
                .set(localmoneyremark).equalTo(record::getLocalmoneyremark)
                .set(net).equalTo(record::getNet)
                .set(zhimingnet).equalTo(record::getZhimingnet)
                .set(ehainet).equalTo(record::getEhainet)
                .set(postdate).equalTo(record::getPostdate)
                .set(flowno).equalTo(record::getFlowno)
                .set(addoperno).equalTo(record::getAddoperno)
                .set(checkstatus).equalTo(record::getCheckstatus)
                .set(invoicetitleid).equalTo(record::getInvoicetitleid)
                .set(oldorderno).equalTo(record::getOldorderno)
                .set(olddate).equalTo(record::getOlddate)
                .set(paymenttype).equalTo(record::getPaymenttype)
                .set(verifyoprno).equalTo(record::getVerifyoprno)
                .set(verifydate).equalTo(record::getVerifydate)
                .set(verifyremark).equalTo(record::getVerifyremark)
                .set(createdate).equalTo(record::getCreatedate)
                .set(feeindex).equalTo(record::getFeeindex)
                .set(beforenet).equalTo(record::getBeforenet)
                .set(isdeleted).equalTo(record::getIsdeleted)
                .set(deleteruserid).equalTo(record::getDeleteruserid)
                .set(deletiontime).equalTo(record::getDeletiontime)
                .set(lastmodificationtime).equalTo(record::getLastmodificationtime)
                .set(lastmodifieruserid).equalTo(record::getLastmodifieruserid)
                .set(creationtime).equalTo(record::getCreationtime)
                .set(creatoruserid).equalTo(record::getCreatoruserid)
                .set(revisetype).equalTo(record::getRevisetype);
    }

    @Generated("org.mybatis.generator.api.MyBatisGenerator")
    default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(BlockOrderDetailFeeSummary record) {
        return UpdateDSL.updateWithMapper(this::update, blockOrderDetailFeeSummary)
                .set(summaryid).equalToWhenPresent(record::getSummaryid)
                .set(contractid).equalToWhenPresent(record::getContractid)
                .set(postyear).equalToWhenPresent(record::getPostyear)
                .set(postmonth).equalToWhenPresent(record::getPostmonth)
                .set(statementno).equalToWhenPresent(record::getStatementno)
                .set(isstatement).equalToWhenPresent(record::getIsstatement)
                .set(fromdate).equalToWhenPresent(record::getFromdate)
                .set(todate).equalToWhenPresent(record::getTodate)
                .set(totalamount).equalToWhenPresent(record::getTotalamount)
                .set(activeflag).equalToWhenPresent(record::getActiveflag)
                .set(feetype).equalToWhenPresent(record::getFeetype)
                .set(orderno).equalToWhenPresent(record::getOrderno)
                .set(driverbonusremark).equalToWhenPresent(record::getDriverbonusremark)
                .set(ultrakmstart).equalToWhenPresent(record::getUltrakmstart)
                .set(ultrakmend).equalToWhenPresent(record::getUltrakmend)
                .set(ultrakmactual).equalToWhenPresent(record::getUltrakmactual)
                .set(ultrakm).equalToWhenPresent(record::getUltrakm)
                .set(driverno).equalToWhenPresent(record::getDriverno)
                .set(othermoneyremark).equalToWhenPresent(record::getOthermoneyremark)
                .set(localmoneyremark).equalToWhenPresent(record::getLocalmoneyremark)
                .set(net).equalToWhenPresent(record::getNet)
                .set(zhimingnet).equalToWhenPresent(record::getZhimingnet)
                .set(ehainet).equalToWhenPresent(record::getEhainet)
                .set(postdate).equalToWhenPresent(record::getPostdate)
                .set(flowno).equalToWhenPresent(record::getFlowno)
                .set(addoperno).equalToWhenPresent(record::getAddoperno)
                .set(checkstatus).equalToWhenPresent(record::getCheckstatus)
                .set(invoicetitleid).equalToWhenPresent(record::getInvoicetitleid)
                .set(oldorderno).equalToWhenPresent(record::getOldorderno)
                .set(olddate).equalToWhenPresent(record::getOlddate)
                .set(paymenttype).equalToWhenPresent(record::getPaymenttype)
                .set(verifyoprno).equalToWhenPresent(record::getVerifyoprno)
                .set(verifydate).equalToWhenPresent(record::getVerifydate)
                .set(verifyremark).equalToWhenPresent(record::getVerifyremark)
                .set(createdate).equalToWhenPresent(record::getCreatedate)
                .set(feeindex).equalToWhenPresent(record::getFeeindex)
                .set(beforenet).equalToWhenPresent(record::getBeforenet)
                .set(isdeleted).equalToWhenPresent(record::getIsdeleted)
                .set(deleteruserid).equalToWhenPresent(record::getDeleteruserid)
                .set(deletiontime).equalToWhenPresent(record::getDeletiontime)
                .set(lastmodificationtime).equalToWhenPresent(record::getLastmodificationtime)
                .set(lastmodifieruserid).equalToWhenPresent(record::getLastmodifieruserid)
                .set(creationtime).equalToWhenPresent(record::getCreationtime)
                .set(creatoruserid).equalToWhenPresent(record::getCreatoruserid)
                .set(revisetype).equalToWhenPresent(record::getRevisetype);
    }
}